{% include 'page_header.html'  %}
	<link rel="stylesheet" type="text/css" href="/style/dialog.css"/>
	<script type="text/javascript" src="/js/jquery.min.js"></script>
	<script type="text/javascript" src="/js/dialog.js"></script>
	<script type="text/javascript" src="/js/account.js"></script>
	<div class="wp">
		<div class="tb">
			<span><a href="javascript:void(0);" onclick="account.add()">添加账户</a></span>
			<span><a href="/log/1" target="_blank">查看领取记录</a></span>
		</div>
		<div class="al">
			<table id="account_list" cellpadding="0" cellspacing="0" border="0" class="at">
				<tr>
					<!-- <th class="c"><input type="checkbox" id="chk_all" /></th> -->
					<th class="u">帐号</th>
					<th class="p">密码</th>
					<th class="s">状态</th>
					<th class="t">最后活动时间</th>
					<th class="o">操作</th>
				</tr>
				{% for account in accounts %}
				<tr class="st{{ account.status }}" id="{{ account.key }}">
					<!-- <td class="c"><input type="checkbox" pid="chk_all"/></td> -->
					<td><a href="log/{{ account.username }}/1" target="_blank">{{ account.username }}</a></td>
					<td class="p"><span>{{ account.password }}</span></td>
					<td>{{ account.status|status_name }}</td>
					<td class="t">{{ account.last_active_time|gmt8_time }}</td>
					<td class="o">
						<a href="javascript:void(0);" onclick="account.changepw('{{ account.username }}');">修改密码</a>
						<a href="javascript:void(0);" class="e0" onclick="account.enable('{{ account.username }}', 0);">启用</a>
						<a href="javascript:void(0);" class="e1" onclick="account.enable('{{ account.username }}', 1);">停用</a>
						<a href="javascript:void(0);" class="d" onclick="account.remove('{{ account.username }}');">删除</a>
					</td>
				</tr>
				{% endfor %}
			</table>
		</div>
	</div>
	<div class="hd">
		<div id="account_dlg">
			<form class="frm" onsubmit="return false;">
				<div class="row"><label>账户</label><input type="text" name="un" class="txt" /></div>
				<div class="row"><label>密码</label><input type="text" name="pw" class="txt" /></div>
				<div class="row"><label>状态</label><input type="checkbox" name="st" checked="checked" value="1" />启用</div>
			</form>
		</div>
		<div id="wait_dlg">
			<div class="loading-panel"></div>
		</div>
	</div>
{% include 'page_footer.html'  %}